home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 19 / 8 / DISK1982.ZIP / FPDISK.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-15  |  4KB  |  122 lines

  1. {------------------------------------------------------------}
  2. {-       FlashPac Pascal Library (Disk Unit) - V3.5         -}
  3. {-      (c) Copyright 1986-1991 - All Rights Reserved       -}
  4. {-                     SimpleSoft Inc                       -}
  5. {-                     1209 Poplar St                       -}
  6. {-                 La Crescent, MN 55947                    -}
  7. {------------------------------------------------------------}
  8.  
  9. Unit FPDisk;
  10. Interface
  11. {$B-,F+}
  12. {$IFNDEF VER40}
  13. {D-}
  14. {$ENDIF}
  15. Const
  16.    DosErrNo   : Integer   =  0;
  17.    CErrCode   : Integer   =  0;
  18.    CErrType   : Integer   = -1;
  19.    CErrDrive  : Integer   = -1;
  20.    CErrDevice : String[8] = '';
  21.  
  22. Type
  23.    TFindRec = Record
  24.                  Attr : Word;
  25.                  Time : Word;
  26.                  Date : Word;
  27.                  Size : LongInt;
  28.                  Name : String[12];
  29.               End;
  30.  
  31. {--------------------------------------------------------------------}
  32. {-                                                                  -}
  33. {--------------------------------------------------------------------}
  34.  
  35.    Procedure CloseFile(Handle : Integer);
  36.    Procedure CreateFile(    Path   : String;
  37.                             Attr   : Integer;
  38.                         Var Handle : Integer);
  39.    Procedure DosFindFirst(    Path    : String;
  40.                               Attr    : Integer;
  41.                           Var FindRec : TFindRec);
  42.    Procedure DosFindNext(Var FindRec : TFindRec);
  43.    Function  FSeek(Handle,Orgin : Integer; Offset : LongInt) : LongInt;
  44.    Function  GetDrive : Integer;
  45.    Procedure GetDTA(Var Segment,Offset : Word);
  46.    Function  GetNDrvs : Integer;
  47.    Function  GetFileSize(Handle : Integer) : LongInt;
  48.    Procedure OpenFile(    Path   : String;
  49.                           Attr   : Integer;
  50.                       Var Handle : Integer);
  51.    Procedure ReadFile(    Handle,NBytes : Integer;
  52.                       Var Buffer                 ;
  53.                       Var RBytes        : Integer);
  54.    Procedure ResetDisk;
  55.    Procedure ResetErrCodes;
  56.    Procedure RestInt24;
  57.    Procedure SetDTA(Segment,Offset : Integer);
  58.    Procedure SetInt24;
  59.    Procedure WriteFile(    Handle,NBytes : Integer;
  60.                        Var Buffer                 ;
  61.                        Var WBytes        : Integer);
  62.  
  63. {--------------------------------------------------------------------}
  64. {-                                                                  -}
  65. {--------------------------------------------------------------------}
  66.  
  67. Implementation
  68. Const
  69.    SegInt24   : Word = 0;
  70.    OfsInt24   : Word = 0;
  71.  
  72.    Copyright1 = 'FlashPac Pascal Library (Disk Unit) - V3.5';
  73.    Copyright2 = '(c) Copyright 1986-1991 - All Rights Reserved';
  74.    Copyright3 = 'SimpleSoft, Inc.';
  75.    Copyright4 = '1209 Poplar St';
  76.    Copyright5 = 'La Crescent, MN 55947';
  77.  
  78.    {$L disk\CloseFil}
  79.    {$L disk\CreatFil}
  80.    {$L disk\FSeek   }
  81.    {$L disk\FindF   }
  82.    {$L disk\FindN   }
  83.    {$L disk\GetDrive}
  84.    {$L disk\GetDTA  }
  85.    {$L disk\GetNDrvs}
  86.    {$L disk\GFilSize}
  87.    {$L disk\OpenFile}
  88.    {$L disk\ReadFile}
  89.    {$L disk\ResetDsk}
  90.    {$L disk\SetDTA  }
  91.    {$L disk\SetInt24}
  92.    {$L disk\WriteFil}
  93.  
  94. {--------------------------------------------------------------------}
  95. {-                                                                  -}
  96. {--------------------------------------------------------------------}
  97.  
  98.    Procedure CloseFile;        External;
  99.    Procedure CreateFile;       External;
  100.    Procedure DosFindFirst;     External;
  101.    Procedure DosFindNext;      External;
  102.    Function  FSeek;            External;
  103.    Function  GetDrive;         External;
  104.    Procedure GetDTA;           External;
  105.    Function  GetNDrvs;         External;
  106.    Function  GetFileSize;      External;
  107.    Procedure OpenFile;         External;
  108.    Procedure ReadFile;         External;
  109.    Procedure ResetDisk;        External;
  110.    Procedure ResetErrCodes;    External;
  111.    Procedure RestInt24;        External;
  112.    Procedure SetDTA;           External;
  113.    Procedure SetInt24;         External;
  114.    Procedure WriteFile;        External;
  115.  
  116. {--------------------------------------------------------------------}
  117. {-                                                                  -}
  118. {--------------------------------------------------------------------}
  119.  
  120. Begin
  121. end.
  122.